package com.rabbiter.oes.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.rabbiter.oes.entity.JudgeQuestionHistory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 判断题答题记录
 */
@Mapper
public interface JudgeQuestionHistoryMapper extends BaseMapper<JudgeQuestionHistory> {

    /**
     * 通过成绩id或取判断考题信息
     * @param scoreId
     * @return
     */
    default List<JudgeQuestionHistory> selectByScoreId(Integer scoreId){
        return selectList(Wrappers.lambdaQuery(JudgeQuestionHistory.class).eq(JudgeQuestionHistory::getScoreId, scoreId));
    }

}
